package com.hello.sky.controller.admin;

import com.hello.sky.model.dto.DataOverViewQueryDTO;
import com.hello.sky.model.vo.BusinessDataVO;
import com.hello.sky.model.vo.DishOverViewVO;
import com.hello.sky.model.vo.OrderOverViewVO;
import com.hello.sky.model.vo.SetmealOverViewVO;
import com.hello.sky.result.Result;
import com.hello.sky.service.WorkSpaceService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

@RestController
@RequestMapping("/admin/workspace")
public class WorkspaceController {

    @Autowired
    private WorkSpaceService workSpaceService;

    /**
     * 今日运营数据
     * @return
     */
    @GetMapping("/businessData")
    @Operation(summary = "查询今日运营数据")
    public Result<BusinessDataVO> businessData(DataOverViewQueryDTO dto){
        BusinessDataVO vo = workSpaceService.businessData(dto);
        return Result.success(vo);
    }

    @GetMapping("/overviewSetmeals")
    @Operation(summary = "查询套餐总览")
    public Result<SetmealOverViewVO> overviewSetmeals(){
        SetmealOverViewVO vo = workSpaceService.overviewSetmeals();
        return Result.success(vo);
    }

    @GetMapping("/overviewDishes")
    @Operation(summary = "查询菜品总览")
    public Result<DishOverViewVO> overviewDishes(){
        DishOverViewVO vo = workSpaceService.overviewDishes();
        return Result.success(vo);
    }

    @GetMapping("/overviewOrders")
    @Operation(summary = "查询订单管理数据")
    public Result<OrderOverViewVO> overviewOrders(){
        OrderOverViewVO vo = workSpaceService.overviewOrders();
        return Result.success(vo);
    }
}
